<template>
	<view>
		<tt-bar leftIcon="icon-back" title="关于我们"></tt-bar>
		<view class="imgBox">
			<image src="../../static/logo.png"></image>
			<text class="appName">找培训商家版</text>
			<text class="tishiText">轻松开店招财进宝</text>
			<text class="appVersion">{{verson}}</text>
			<text class="copyright">南京都秀文化传媒有限公司</text>
			<view class="yszc">
				<text  @tap="toPage" :data-url="initInfo.privacy">隐私政策</text> |
				<text  @tap="toPage" :data-url="initInfo.policy">入驻协议</text>
			</view>
		</view>
	</view>
</template>

<script>
	import ttBar from "@/components/ttBar/ttBar.vue";
	import API from "@/common/api.js";
	export default {
		components: {
			ttBar
		},
		data() {
			return {
				verson:'',
				initInfo:{
					privacy:''
				}
			};
		},
		methods:{
			getXieyi(){
				// #ifndef APP-NVUE
				this.verson='1.0.0';
				// #endif
				// #ifdef APP-PLUS
				plus.runtime.getProperty(plus.runtime.appid,res=>{
					this.verson=res.version
				})
				// #endif
				API.getInitZation().then(res=>{
					if(res.data.result==1){
						this.initInfo=res.data.data
						uni.setStorageSync("initInfo",res.data.data)
					}else{
						this.initInfo=uni.getStorageSync("initInfo",res.data.data)
					}
				})
			}
		},
		onLoad() {
			this.getXieyi();
		},
		onPullDownRefresh() {
			setTimeout(() => {
				uni.stopPullDownRefresh();
			}, 1500)
		}
	}
</script>

<style lang="less">
	.imgBox {
		margin-top: 90upx;
		display: flex;
		flex-direction: column;
		align-items: center;

		image {
			width: 160upx;
			height: 160upx;
			margin-bottom: 40upx;
		}

		.appName {
			font-size: 34rpx;
			color: #222433;
			margin-bottom: 24upx;
		}

		.tishiText {
			font-size: 26rpx;
			color: #222433;
			margin-bottom: 38upx;
		}

		.appVersion {
			font-size: 26rpx;
			color: #222433;
		}

		.copyright {
			position: absolute;
			left: 0;
			bottom: 100upx;
			width: 100%;
			text-align: center;
			font-size: 26rpx;
			color: #222433;
		}
		.yszc{
			position: absolute;
			left: 0;
			bottom: 50upx;
			width: 100%;
			text-align: center;
			font-size: 28upx;
			color: #999999;
			text{
				margin: 0 20upx;
				color: #ffb423;
			}
		}
	}
</style>
